Thanks ptrblck for replying , what i need is to load the whole files in the directory as one sampler to use it with the torch.Dataloader as follow :
Train_dst = MyDataset(path=path, train=True)
Test_dst = MyDataset(path=path, train=False)

TrainLoader = torch.utils.data.DataLoader(dataset=Train_dst, batch_size=50, shuffle=True )
TestLoader = torch.utils.data.DataLoader(dataset=Test_dst, batch_size=50, shuffle=True )